#set(title="人事管理")
#@layout()

#define body()
<div class="layui-tab layui-tab-brief tab" lay-filter="tab">
    <ul class="layui-tab-title">
        <li>人员</li>
        <li>部门</li>
        <li class="layui-this">调动</li>
    </ul>
    <div class="layui-tab-content">
        <div class="layui-main site-inline">
            <div class="site-tree">
                <ul class="layui-tree">
                    <li>
                        <h2 id="test">类型</h2>
                    </li>
                    <li class="site-tree-noicon">
                        <a class="department" href="/emp/entry"><cite>入职</cite></a>
                    </li>
                    <li class="site-tree-noicon">
                        <a class="department" href="/emp/dimission"><cite>离职</cite></a>
                    </li>
                    <li class="site-tree-noicon">
                        <a class="department" href="/emp/transfer"><cite>调动</cite></a>
                    </li>
                </ul>
            </div>
            <div class="site-content">
                <div>
                    <form action="" class="layui-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label">员工编号</label>
                            <div class="layui-input-inline">
                                <input autocomplete="off" class="layui-input" lay-verify="number" name="id"
                                       placeholder="请输入员工编号"
                                       type="text">
                            </div>
                            <button class="layui-btn" lay-filter="search" lay-submit>搜索</button>

                            #if(manager)
                            <button class="layui-btn layui-btn-normal new-emp" id="newTransfer">新增调动</button>
                            #end
                        </div>
                    </form>
                </div>
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>
                        <a>调动信息</a>
                    </legend>
                </fieldset>
                <table id="table" lay-filter="transfer-table"></table>
            </div>
        </div>

    </div>
</div>


#end

#define css()
<link rel="stylesheet" href="/assets/css/emp.css">
#end


#define js()
<script src="/assets/js/tranfer.js"></script>
#end


<form class="layui-form new-emp-form" action="" id="newTransferForm">
    <div class="layui-form-item">
        <label class="layui-form-label">员工编号</label>
        <div class="layui-input-inline">
            <input type="text" name="emp" required lay-verify="number" placeholder="请输入员工编号" autocomplete="off"
                   class="layui-input">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-inline">
            <select name="state" lay-verify="required">
                <option value="在职">在职</option>
                <option value="返聘">返聘</option>
                <option value="实习生">实习生</option>
            </select>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">部门</label>
        <div class="layui-input-block">
            <select name="department" lay-verify="required">
                <!--<option value=""></option>-->
                #for(x:department)
                <option value="#(x.id)">#(x.dName)</option>
                #end
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">员工权限</label>
        <div class="layui-input-inline">
            <select name="level" lay-verify="required">
                <option value="员工">员工</option>
                <option value="部门经理">部门经理</option>
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux">若调动为部门经理会替换掉当前经理</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">管理员</label>
        <div class="layui-input-inline" style="width:80px ;">
            <input type="checkbox" name="admin" lay-skin="switch">
        </div>

    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="newTransferSubmit">立即提交</button>
            <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
        </div>
    </div>
</form>